package com.bawei.lib_common.base

import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import androidx.databinding.DataBindingUtil
import androidx.databinding.ViewDataBinding
import com.luck.picture.lib.utils.ToastUtils

abstract class BaseActivity <VDB:ViewDataBinding>:AppCompatActivity(){
    lateinit var mDataNBinding:VDB

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        mDataNBinding=DataBindingUtil.setContentView(this,getLayoutId())
        initViews()
    }
    fun showToastMsg(msg:String){
        if(!msg.isNullOrEmpty()){
            com.blankj.utilcode.util.ToastUtils.showLong(msg)
        }
    }

    abstract fun getLayoutId(): Int
    abstract fun initViews()


}